home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ MSI Options 3.xpl < prev    next >
Text File  |  1999-11-02  |  2KB  |  64 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="System\Software Installation\Windows Installer"
  5. "NAME"="Logging Options"
  6. "VERSION"="0.93"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Log all errors"
  9. "TEXT 2"="Log out-of-memory errors"
  10. "TEXT 3"="Log all warnings (not fatal)"
  11. "TEXT 4"="Log user requests"
  12. "TEXT 5"="Log when starting commands"
  13. "DESCRIPTION 1"="By default, the setup process for an application determines whether the process maintains a log for itself.  This option allows you to enable the logging for the setup of an applications, regardless of this default."
  14. "DESCRIPTION 2"="If at least one option is turned on, a logfile for every installation will be created in your TEMP directory in the form "MSI*.LOG" where "*" is a randomly generated name."
  15. "DESCRIPTION 3"="To disable logging for all applications again, clear all fields."
  16. "AUTHOR"="Xteq Systems"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  19. "COMMENT 2"="By default, every application sets itself if the setup should be logged or not. By setting an option here, you can enable the logging for all setups regardless if it's activated by the application or not."
  20. "COMMENT 3"="Thanks to Umesh Reghuram for his suggestions!"
  21.  
  22.  
  23. sPathSys="HKLM\Software\Policies\Microsoft\Windows\Installer\"
  24. sPathUsr="HKCU\Software\Policies\Microsoft\Windows\Installer\"
  25.  
  26. sV1="Logging" 'STR - sys
  27. Sub Plugin_Initialize 
  28.  s=RegReadValue(sPathSys & sV1)
  29.  
  30.  if InStr(1,s,"e")>0 then setuielement 1,true
  31.  if InStr(1,s,"m")>0 then setuielement 2,true
  32.  if InStr(1,s,"w")>0 then setuielement 3,true
  33.  if InStr(1,s,"u")>0 then setuielement 4,true
  34.  if InStr(1,s,"a")>0 then setuielement 5,true
  35. End Sub
  36.  
  37. Sub Plugin_CheckData(ElementIndex)
  38. End Sub
  39.  
  40. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  41.  s=""
  42.  
  43.  if GetUIElement(1)=true then s=s & "e"
  44.  if GetUIElement(2)=true then s=s & "m"
  45.  if GetUIElement(3)=true then s=s & "w"
  46.  if GetUIElement(4)=true then s=s & "u"
  47.  if GetUIElement(5)=true then s=s & "a"
  48.  
  49.  if len(s)>0 then
  50.     'Enable logging
  51.     Call RegWriteValue(sPathSys & sV1,s,1)
  52.  else
  53.     'Disable logging
  54.     s=RegReadValue(sPathSys & sV1)
  55.     if IsEmpty(s)=false then
  56.        Call RegDeleteValue(sPathSys & sV1)
  57.     end if
  58.  end if
  59.  
  60. End Sub
  61.  
  62. Sub Plugin_Terminate 
  63. End Sub
  64.